/// @file
/// @author Chelsey Batchelor <vadedeyes@gmail.com>
/// @author Abraham Escamilla <abraham.escamilla@live.com>
/// @author Curtis Hollibaugh <curtis.hollibaugh@gmail.com>
/// @copyright Copyright 2014 Chelsey Batchelor <vadedeyes@gmail.com>
/// @copyright Copyright 2014 Abraham Escamilla <abraham.escamilla@live.com>
/// @copyright Copyright 2014 Curtis Hollibaugh <curtis.hollibaugh@gmail.com>
/// Contains tests written while implementing tray icons.

#include "../gui/gui.hpp"
#include "../gui/trayicon.hpp"

#include <chrono>
#include <gtest/gtest.h>

using std::chrono::milliseconds;

/// Makes a tray icon, displays it, and hides it.
TEST(TrayIcon, MakeAndShow) {
	GUI gui{};
	gui.Start();
	
	TrayIcon ti{"res/icon.png"};
	EXPECT_FALSE(ti.IsVisible());
	
	ti.Show();
	EXPECT_TRUE(ti.IsVisible());
	
	//std::this_thread::sleep_for(milliseconds{1000}); // uncomment this line to see the tray icon
	
	ti.Hide();
	EXPECT_FALSE(ti.IsVisible());
	
	gui.Stop();
}
